package com.example.order.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.order.IOrderService;
import com.example.order.entity.Result;
import com.example.order.entity.TradeOrder;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: robert.song
 * @Date: Created in 2021/12/19
 */

@RestController
@RequestMapping("/order")
public class OrderController {
    @Reference
    private IOrderService orderService;

    @RequestMapping("/confirm")
    public Result confirmOrder(@RequestBody TradeOrder tradeOrder){
        return orderService.confirmOrder(tradeOrder);
    }
}
